package org.bbelovic.devel.snake;

import javax.swing.SwingUtilities;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Application runner which contains only <code>main</code> method for application bootstrap.
 */
public class App 
{
    public static void main( String[] args )
    {
        final Runnable doRun = new Runnable() {
            public void run() {
                final ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/META-INF/org/bbelovic/devel/snake/applicationContext.xml");
//                final ApplicationFrame appFrame = new ApplicationFrame(410, 410);
                final ApplicationFrame appFrame = ctx.getBean("applicationFrame", ApplicationFrame.class);
                appFrame.createAndShowGUI();
            }
        };
        /*
         * Runs GUI safely on AWT event dispatching thread.
         */
        SwingUtilities.invokeLater(doRun);
    }
}
